package com.ruoyi.volunteercollege.mapper;

import com.ruoyi.volunteercollege.domain.ExamVolunteerCollege;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ExamVolunteerCollegeMapper {

    @Select("SELECT * FROM tb_volunteer_college WHERE id = #{id}")
    ExamVolunteerCollege selectVolunteerCollegeById(Long id);

    @Select("SELECT * FROM tb_volunteer_college")
    List<ExamVolunteerCollege> selectVolunteerCollegeList();

    @Insert("INSERT INTO tb_volunteer_college (name) VALUES (#{name})")
    int insertVolunteerCollege(ExamVolunteerCollege volunteerCollege);

    @Update("UPDATE tb_volunteer_college SET name = #{name} WHERE id = #{id}")
    int updateVolunteerCollege(ExamVolunteerCollege volunteerCollege);

    @Delete("DELETE FROM tb_volunteer_college WHERE id = #{id}")
    int deleteVolunteerCollegeById(Long id);
}
